#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#define BUFFER_SIZE 1024
int main(int argc, char const *argv[])
{
    int fd = open("./tmp/re3.txt",O_RDONLY);
    char* str = malloc(BUFFER_SIZE);
    int number = -1;
    while((number=read(fd,str,BUFFER_SIZE))!=0)
    {
        char* str2 = malloc(1024);
        sprintf(str2,"I have read %d char",number);
        write(STDOUT_FILENO,str2,strlen(str2));
    }
    close(fd);
    return 0;
}